package br.com.moxeon.model.financialitems;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.moxeon.model.Bank;
import br.com.vexillum.model.annotations.Validate;

@SuppressWarnings("serial")
@Entity
@Table(name = "third_check")
public class ThirdCheck extends Check {
	
	@Column(nullable = false)
	@Validate(notNull = true)
	private String agency;
	
	@ManyToOne(targetEntity = Bank.class, fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "bank_id", nullable = false)
	@Validate(notNull = true)	
	private Bank bank;
	
	@Column(name = "account_number", nullable = false)
	@Validate(notNull = true)
	private String accountNumber;

	public String getAgency() {
		return agency;
	}

	public Bank getBank() {
		return bank;
	}

	public String getAccountNumber() {
		return accountNumber;
	}

	public void setAgency(String agency) {
		this.agency = agency;
	}

	public void setBank(Bank bank) {
		this.bank = bank;
	}

	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

}